package cn.wolfcode.trip.base.domain;

import com.alibaba.druid.support.json.JSONUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.HashMap;

@Getter
@Setter
@ToString
public class Signin extends  BaseDomain{
    private User user;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date time;

    private Integer count;

    public String getJson() {
    HashMap<String, Object> map = new HashMap();
    map.put("id", this.id);
    map.put("time", this.time);
    map.put("count", this.count);
    return JSONUtils.toJSONString(map);
}

}